//
//  UIView.swift
//  ss-2t-ios-app
//
//  Created by 胡秋生 on 2019/6/6.
//  Copyright © 2019 胡秋生. All rights reserved.
//

import UIKit
extension UIView{
    
    // 转换在不同设备上的数值大小，默认使用iPhone 6 的屏幕
   public func CGFloatAutoFit(_ float:CGFloat ,_ width:CGFloat=375)->CGFloat {
        let min = UIScreen.main.bounds.height < UIScreen.main.bounds.width ? UIScreen.main.bounds.height :UIScreen.main.bounds.width
        return min / width * float
    }
    
}
